home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / finders.doc < prev    next >
Text File  |  1995-03-31  |  2KB  |  67 lines

  1. (Comp.sys.handhelds) 
  2. Item: 781 by jurjen at cwi.nl 
  3. Author: [Jurjen NE Bos] 
  4.   Subj: Three little HP48 utilities 
  5.   Date: Fri Sep 21 1990 07:55  
  6.  
  7. Here are three very simple programs.  I find them not very interesting, but 
  8. together they're just good enough to be postable. 
  9. Have fun! 
  10.       Jurjen 
  11.  
  12. PFF is a file finder. 
  13. Put in your HOME directory under the name PFF. 
  14. Input: a name. Call from the HOME directory. 
  15. Output: the list of all PATHs where name resides. 
  16.  
  17. %%HP: T(3)A(R)F(,); @checksum #6DFFh 
  18. \<< 
  19.   IF VARS OVER POS 
  20.   THEN PATH 1 \->LIST 
  21.   ELSE { } 
  22.   END SWAP 15 TVARS \-> name dir 
  23.   \<< 
  24.     IF dir { } \=/ 
  25.     THEN 1 dir SIZE 
  26.       FOR var dir var GET EVAL name PFF + UPDIR 
  27.       NEXT 
  28.     END 
  29.   \>> 
  30. \>> 
  31.  
  32. FF is a file finder that is meant for interactive use. 
  33. Put it in your HOME directory under the name FF. 
  34. Input: a name. Call from the HOME directory. 
  35. Output: if the name is found: nothing, but the current directory will 
  36. contain the name, and the menu will be the row of the VAR menu containing 
  37. the name.  Otherwise, the name will be on the stack and the menu and 
  38. directory unchanged. 
  39.  
  40. %%HP: T(3)A(R)F(,); @Checksum: #86CAh 
  41. \<< 
  42.   IF DUP VTYPE 0 \>= 
  43.   THEN VARS SWAP POS 1205 + 6 / IP 100 / MENU 0 DOERR 
  44.   END 15  \-> dir 
  45.   \<< 
  46.     IF dir { } \=/ 
  47.     THEN 1 dir SIZE 
  48.       FOR var dir var GET EVAL FF UPDIR 
  49.       NEXT 
  50.     END 
  51.   \>> 
  52. \>> 
  53.  
  54. FRE is a program that gives the number of free bytes, just like MEM, 
  55. but does not do the garbage collection.  Gives you a good idea how often a 
  56. garbage collection takes place.  Tip: put 'FRE' in EQ and plot it.  Scale Y 
  57. from 0 to 30000.  (Autoscale get terribly confused). 
  58. (To be converted with ASC\->) 
  59.  
  60. %%HP:; 
  61. "D9D2016F50FBD81ED2A2EF9A2B21308D43" 
  62.  
  63. |                 | "Never imagine yourself not to be otherwise than what | 
  64. | Jurjen N.E. Bos | it might appear to others that what you were or might | 
  65. |                 | have been was not otherwise than what you had been    | 
  66. |  jurjen@cwi.nl  | would have appeared to them to be otherwise."         | 
  67.